package com.ruoyi.system.service;

import com.ruoyi.system.domain.dto.OpenApiDTO;
import java.util.List;

import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.DefGain;
import com.ruoyi.system.domain.DefGainReview;
import com.ruoyi.system.domain.request.CompanyRequest;
import com.ruoyi.system.domain.request.GainRequest;
import com.ruoyi.system.domain.vo.*;
import com.ruoyi.system.domain.vo.DefDrillGainVo;
import com.ruoyi.system.domain.vo.DefGainListVo;
import com.ruoyi.system.domain.vo.DefGainVo;
import com.ruoyi.system.domain.vo.DefTeamCount;
import com.ruoyi.system.domain.vo.DefTeamDetailVo;
import com.ruoyi.system.domain.vo.DefTeamGainVo;
import com.ruoyi.system.domain.vo.GainCountVo;
import com.ruoyi.system.domain.vo.GainGaredeVo;
import org.springframework.transaction.annotation.Transactional;

/**
 * 成果管理Service接口
 * 
 * @author ruoyi
 * @date 2024-10-11
 */
public interface IDefGainService 
{
    /**
     * 查询成果管理
     * 
     * @param id 成果管理主键
     * @return 成果管理
     */
    public DefGain selectDefGainById(Long id);

    DefGainVo detail(Long id);

    /**
     * 查询成果管理列表
     * 
     * @param defGain 成果管理
     * @return 成果管理集合
     */
    public List<DefGain> selectDefGainList(DefGain defGain);

    /**
     * 新增成果管理
     * 
     * @param defGain 成果管理
     * @return 结果
     */
    public int insertDefGain(DefGain defGain);

    /**
     * 修改成果管理
     * 
     * @param defGain 成果管理
     * @return 结果
     */
    public int updateDefGain(DefGain defGain);

    /**
     * 批量删除成果管理
     * 
     * @param ids 需要删除的成果管理主键集合
     * @return 结果
     */
    public int deleteDefGainByIds(Long[] ids);

    /**
     * 删除成果管理信息
     * 
     * @param id 成果管理主键
     * @return 结果
     */
    public int deleteDefGainById(Long id);

    Boolean submitGain(DefGain defGain);

    Boolean gainReview(DefGainReview gainReview);

    @Transactional(rollbackFor = Exception.class)
    Boolean gainAppeal(DefGainReview gainReview);

    @Transactional(rollbackFor = Exception.class)
    Boolean gainAppealReview(DefGainReview gainReview);

    List<DefGainListVo> pageList(GainRequest request);

    GainCountVo gainCount(GainRequest request);

    DefDrillGainVo drillGain();

    List<GainGaredeVo> gainGaredes();

    List<DefTeamGainVo> teamCount(Integer orderBy);

    TableDataInfo companyPage(CompanyRequest request);

    List<DefTeamCount> teamTypeCount(Integer drillId);

    DefTeamDetailVo getTeamScore();
    List<DefGainAggVO> sortAttack(Integer drillId);

    List<DefGainAggVO> sortDefend(Integer drillId);

    List<DefGainResultVO> resultShow(Integer drillId);
    List<CountVO> unitSort(Integer drillId);
    LevelVO resultLevel(Integer drillId);

    List<DefGain> gain(OpenApiDTO dto);
}
